import { createRouter, createWebHashHistory } from 'vue-router'

import Home from '../components/Home/Index.vue'
import OffLine from '../components/Home/OffLine.vue'
import HistoryRecord from '@/views/HistoryRecord/Index.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/historyRecord',
    name: 'HistoryRecord',
    component: HistoryRecord
  },
  {
    path: '/offline',
    name: 'offline',
    component: OffLine
  }
]

const router = createRouter({
  history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
  routes
})

export default router
